<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>slot</title>
</head>
<body>
<div id="app">
  <my-component>
    <h5>this slot</h5>
  </my-component>
</div>

<script src="vue.global.js"></script>
<script>

  const App = {
    data(){
      return {
      }
    },
    components: {
      'myComponent':{
        data(){
          return {
            count: 100
          }
        },
        // 模版
        template: `
        <h3>计算器{{count}}</h3>
        <slot></slot>
        <button @click="count++">count++</button>

        `
      }
    }
  }

  const vm = Vue.createApp(App).mount('#app');
  console.log(vm)
</script>
</body>
</html>
